package model

// GetSecretParams QueryParams get secret params
type GetSecretParams struct {
	SecretID     string
	VersionID    string
	VersionStage string
}

type ResponseType int

const (
	ResponseTypeForAliyunKMS ResponseType = iota
	ResponseTypeForAWSSecretManager
	ResponseTypeForVaultKvSecret
)

// aws secret manager response
type SecretManagerResponse struct {
	ARN           string   `json:"ARN"`
	Name          string   `json:"Name"`
	VersionId     string   `json:"VersionId"`
	SecretString  string   `json:"SecretString"`
	VersionStages []string `json:"VersionStages"`
	CreatedDate   string   `json:"CreatedDate"`
}

// vault kv secret response
type KvV2SecretData struct {
	Data *KVSecret `json:"data"`
}

type KVSecret struct {
	Data     map[string]interface{} `json:"data"`
	Metadata *SecretMetadata        `json:"metadata"`
}
type SecretMetadata struct {
	CreatedTime    string      `json:"created_time"`
	CustomMetadata interface{} `json:"custom_metadata"`
	DeletionTime   string      `json:"deletion_time"`
	Destroyed      bool        `json:"destroyed"`
	Version        int         `json:"version"`
}
